﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SharpCmd.Controls
{
    internal class ImageLists
    {
        public const int FILEDIRECTORY_FILE = 0;
        public const int FILEDIRECTORY_DIRECTORY = 1;

        private static object lockObject;
        private static ImageList fileDirectoryListInstance;

        static ImageLists()
        {
            lockObject = new object();
        }

        public static ImageList FileDirectoryList
        {
            get
            {
                lock (lockObject)
                {
                    if (fileDirectoryListInstance == null)
                        CreateList();
                    return fileDirectoryListInstance;
                }
            }
        }

        private static void CreateList()
        {
            fileDirectoryListInstance = new ImageList();
            fileDirectoryListInstance.Images.Add("file", Properties.Resources.iFile);
            fileDirectoryListInstance.Images.Add("directory", Properties.Resources.iDirectory);
            fileDirectoryListInstance.TransparentColor = System.Drawing.Color.Transparent;
        }
    }
}